﻿/*
 * HexPath.cs
 *
 * Created on November 25, 2007, 2:19 PM
 *
 * Copyright (C) 2007-2008  Hylke van der Schaaf
 * Copyright (C) 2010       Mathijs Miermans
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, in version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
using System;
using System.Net;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;


namespace HexTD
{
	public class HexPath : HexBase
	{
		protected new Color fillColor;

		/**
		 * Creates a new instance of HexPath
		 */
		public HexPath(Game game, int x, int y, Context context) :
			base(game, x, y, context, false)
		{
			this.borderColor = this.context.colors.getColorBaseEmptyHexBorder();
			this.fillColor = this.context.colors.getColorOpenBackGround();
			this.type = HexBase.PATH;
			this.shortName = 'p';
		}

		public override void Draw(GameTime gameTime)
		{
#if PORT
			if (g2_0 != null)
			{
				this.polyHex.Fill = new SolidColorBrush(this.fillColor);
				g2_0.Children.Add(this.polyHex);
			}
#endif
		}

		public override void DrawEffects(GameTime gameTime)
		{
#if PORT
			switch (this.highlight)
			{
				case highlightType.placeTower:
					g2.setColor(this.highlightNOK);
					g2.fill(this.polyHex);
					this.paintRangeCircle(g2);
					break;
				case highlightType.editHex:
					g2.setColor(this.highlightOK);
					g2.fill(this.polyHex);
					break;
				default:
			}
#endif
		}

	}
}
